<div id="slider" class="nivoSlider">
    <?php
    if ($slide) {
        foreach ($slide as $key => $value) {
            echo '<img src="' . Yii::app()->baseUrl . '/timthumb.php?src=' . Yii::app()->baseUrl . '/data/image/slide/' . $value['name'] . '&h=350&w=978">';
        }
    }
    ?>    
</div>
<div class="main">
    <div class="leftcolumn">
        <?php
        if (isset($product[0])):
            ?>
            <div class="procarscroll">
                <h2 class="tleprocarscroll"><?= $cate[0]['name']; ?></h2>
                <ul class="flexiselDemo3">
                    <?php foreach ($product[0] as $key => $value): ?>
                        <li>
                            <a href="<?php echo Yii::app()->baseUrl; ?>/san-pham/<?= $value['slug'] ?>.html">
                                <img alt="<?= $value['name'] ?>" src="<?php echo Yii::app()->baseUrl; ?>/timthumb.php?src=<?php echo Yii::app()->baseUrl; ?>/data/cover/<?php echo $value->cover_image ?>&h=122&w=162" />
                                <h2><?= $value['name'] ?></h2>
                            </a>
                        </li>        
                    <?php endforeach;
                    if (count($parents) > 0):
                        ?>
        <?php foreach ($parents as $k => $v): ?>
                            <li>
                                <a href="<?php echo Yii::app()->baseUrl; ?>/san-pham/<?= $v['slug'] ?>.html">
                                    <img alt="<?= $v['name'] ?>" src="<?php echo Yii::app()->baseUrl; ?>/timthumb.php?src=<?php echo Yii::app()->baseUrl; ?>/data/cover/<?php echo $v->cover_image ?>&h=122&w=162" />
                                    <h2><?= $v['name'] ?></h2>
                                </a>
                            </li>    
        <?php endforeach;
    endif; ?>
                </ul>  
            </div>
            <?php
        endif;
        if (isset($product[1])):
            ?>
            <div class="procategories">
                <h2 class="tleprocategories"><span><?= $cate[1]['name']; ?></span></h2>
                <ul>
    <?php foreach ($product[1] as $key => $value): ?>
                        <li>
                            <a href="<?php echo Yii::app()->baseUrl; ?>/san-pham/<?= $value['slug'] ?>.html">
                                <img alt="<?= $value['name'] ?>" src="<?php echo Yii::app()->baseUrl; ?>/timthumb.php?src=<?php echo Yii::app()->baseUrl; ?>/data/cover/<?php echo $value->cover_image ?>&h=122&w=162" />
                                <h2><?= $value['name'] ?></h2>
                            </a>
                        </li>
    <?php endforeach;
    ?>
                </ul>
            </div>
            <?php
        endif;
        if (isset($product[2])):
            ?>
            <div class="procarscroll">
                <h2 class="tleprocarscroll"><span><?= $cate[2]['name']; ?></span></h2>
                <ul class="flexiselDemo4">
    <?php foreach ($product[2] as $key => $value): ?>
                        <li>
                            <a href="<?php echo Yii::app()->baseUrl; ?>/san-pham/<?= $value['slug'] ?>.html">
                                <img alt="<?= $value['name'] ?>" src="<?php echo Yii::app()->baseUrl; ?>/timthumb.php?src=<?php echo Yii::app()->baseUrl; ?>/data/cover/<?php echo $value->cover_image ?>&h=122&w=162" />
                                <h2><?= $value['name'] ?></h2>
                            </a>
                        </li>
    <?php endforeach; ?>

                </ul>
            </div>
            <?php
        endif;
        ?>
    </div>
<?php $this->widget('SidebarWidget'); ?>
</div>